﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/public-regular.master" AutoEventWireup="true"
    CodeFile="address-add.aspx.cs" Inherits="myaccount_address_add" %>

<%@ Register Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<%@ Register Src="~/controls/wucValidator.ascx" TagName="Validator" TagPrefix="wuc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderNestedHeader"
    runat="Server">
    <link href="<%= SiteGlobals.BaseUrl %>thirdparty/date-picker/DatePicker.css" rel="stylesheet"
        type="text/css" />
    <script type="text/javascript" src="<%= SiteGlobals.BaseUrl %>thirdparty/date-picker/date-picker.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMiddleContent" runat="Server">
    <ucc:ResponseMessage ID="uccResponseMessage" runat="server"></ucc:ResponseMessage>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
        ValidationGroup="vGroup" DisplayMode="BulletList" ShowMessageBox="true" HeaderText="Please correct the following:"
        CssClass="adminValidator" ShowSummary="False" />
    <p>
        <label>
            First Name</label>
        <br />
        <asp:TextBox ID="tbxShippingFirstName" runat="server" CssClass="text"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvShippingFirstName" runat="server" ControlToValidate="tbxShippingFirstName"
            ErrorMessage="Shipping Address First Name is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator runat="server" ID="revShippingFirstName" ControlToValidate="tbxShippingFirstName"
            EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Name Format"
            SetFocusOnError="true" ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
        </asp:RegularExpressionValidator>
        <br />
        <label>
            Last Name</label><br />
        <asp:TextBox ID="tbxShippingLastName" runat="server" CssClass="text"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvShippingLastName" runat="server" ControlToValidate="tbxShippingLastName"
            ErrorMessage="Shipping Address Last Name is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator runat="server" ID="revShippingLastName" ControlToValidate="tbxShippingLastName"
            EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Name Format"
            SetFocusOnError="true" ValidationExpression="^([a-zA-Z])+?(([- .])*?([a-zA-Z])*)*$">
        </asp:RegularExpressionValidator>
        <br />
        <label>
            Address Line 1</label><br />
        <asp:TextBox ID="tbxShippingAddressLine1" runat="server" CssClass="text"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvShippingAddressLine1" runat="server" ControlToValidate="tbxShippingAddressLine1"
            ErrorMessage="Shipping Address Line 1 is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <br />
        <label>
            Address Line 2</label><br />
        <asp:TextBox ID="tbxShippingAddressLine2" runat="server" CssClass="text"></asp:TextBox>
        <br />
        <label>
            Company Name</label><br />
        <asp:TextBox ID="tbxCompanyName" runat="server" CssClass="text"></asp:TextBox>
        <br />
        <label>
            City</label><br />
        <asp:TextBox ID="tbxShippingCity" runat="server" CssClass="text"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvShippingCity" runat="server" ControlToValidate="tbxShippingCity"
            ErrorMessage="Shipping Address City is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <br />
        <label>
            State</label><br />
        <ucc:StateDropDownList ID="uccShippingState" runat="server" UseFirstItem="true" CssClass="input1"
            Style="width: 155px; background-color: rgb(255, 255, 160);" FirstItemText="None / Other"
            FirstItemValue="NA">
        </ucc:StateDropDownList>
        <asp:RequiredFieldValidator ID="rfvShippingState" runat="server" ControlToValidate="uccShippingState"
            ErrorMessage="Shipping Address State is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <br />
        <label>
            Zip Code</label><br />
        <asp:TextBox ID="tbxShippingZipCode" runat="server" CssClass="text" size="5" Width="52px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvShippingZipCode" runat="server" ControlToValidate="tbxShippingZipCode"
            ErrorMessage="Shipping Address Zip Code is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator runat="server" ID="revShippingZipCode" ControlToValidate="tbxShippingZipCode"
            EnableClientScript="true" ValidationGroup="vGroup" ErrorMessage="Incorrect Name Format"
            SetFocusOnError="true" ValidationExpression="^\d{5}$">
        </asp:RegularExpressionValidator>
        <br />
        <label>
            Country</label><br />
        <ucc:CountryDropDownList ID="uccShippingCountry" CssClass="input1" runat="server"
            Style="width: 155px; background-color: rgb(255, 255, 160);">
        </ucc:CountryDropDownList>
        <asp:RequiredFieldValidator ID="rfvShippingCountry" runat="server" ControlToValidate="uccShippingCountry"
            ErrorMessage="Shipping Address Country is required" Display="dynamic" SetFocusOnError="true"
            EnableClientScript="true" ValidationGroup="vGroup">
        </asp:RequiredFieldValidator>
        <br />
        <label>
            Telephone Number</label><br />
        <asp:TextBox ID="tbxShippingPhoneNumber" runat="server" CssClass="text"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvShippingPhoneNumber" runat="server" ControlToValidate="tbxShippingPhoneNumber"
            ErrorMessage="Shipping Telephone Number is required" Display="dynamic" SetFocusOnError="true"
            ValidationGroup="vGroup" EnableClientScript="true">
        </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator runat="server" ID="revShippingPhoneNumber" ControlToValidate="tbxShippingPhoneNumber"
            EnableClientScript="true" ErrorMessage="Incorrect Phone Format" SetFocusOnError="true"
            ValidationGroup="vGroup" ValidationExpression="^\d{3}-\d{3}-\d{4}$">
        </asp:RegularExpressionValidator>
        <br />
        <asp:CheckBox ID="cbxIsDefault" runat="server" Text="Easy checkout please set this shipping address as default"
            Checked="true" />
    </p>
    <asp:Button ID="btnSave" runat="server" ValidationGroup="vGroup" AlternateText="Save"
        CausesValidation="true" CssClass="button medium red" Text="Save" OnClick="btnSave_Click" />
</asp:Content>
